package ntd.util.frame.storage.tool;

import ntd.util.frame.storage.bo.StorageInBO;
import ntd.util.frame.storage.bo.StorageOutBO;
import ntd.util.frame.storage.service.NtdStorageService;

/**
 * @author: liuwenju
 * @date: 2023/6/7 16:28
 * @version: 1.0
 */
public class ToolStorage {

    private static final NtdStorageService ntdStorageService = new NtdStorageService();

    public static StorageOutBO save(String buck, byte[] bytes, String name) {

        StorageInBO storageInBO = new StorageInBO();

        storageInBO.setBucketName(buck);
        storageInBO.setChannelBusinessId("402809817fbc4f3d017fbcbed26a001d");
        storageInBO.setBytes(bytes);
        storageInBO.setOriginName(name);

        return ntdStorageService.store(storageInBO);
    }

}
